<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>provide/inject</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="../../static/vue.js"></script>
</head>
<body>
    <div id="demo">
        <childnode></childnode><button @click="sys.a=100">ddd</button>
    </div>
    <script>
    Vue.component('childnode', { 
        template:'<div>{{foo}}{{sys.a}}</div>',
        inject:['foo']
    }) 
    Vue.prototype.sys={
        a:123456789121223
    }
    new Vue({
        el:'#demo',
        provide:{
            foo:'barcnsddsfan sjkfshak fsdkl aj'
        }
    })   
    </script>
</body>
</html>